<!--
 * @Description: 币种管理-白名单管理
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2024-03-05
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2025-02-14
-->
<script lang="ts" setup>
  import { computed, watch } from 'vue'

  const props = defineProps({
    visible: { type: Boolean, default: false },
  })

  const emits = defineEmits(['update:visible', 'success'])

  const visible = computed({
    get: () => props.visible,
    set: (val: boolean) => emits('update:visible', val),
  })

  watch(
    () => visible.value,
    (newVal) => {
      if (newVal) onPageShow()
      else onPageHide()
    },
  )

  /**
   * 页面显示
   */
  const onPageShow = () => {}

  /**
   * 页面关闭
   */
  const onPageHide = () => {}

  /**
   * 确定
   */
  const onOk = () => {
    visible.value = false
    emits('success')
  }
</script>

<template>
  <div class="add">
    <a-modal v-model:visible="visible" title="白名单管理" @ok="onOk"> TODO </a-modal>
  </div>
</template>

<style lang="less" scoped></style>
